import {get,post} from './index';

// ----------------------菜单管理------------------------
//菜单列表
export const getMenuList = (data)=>get('/menulist',{istree:1})
//菜单的添加
export const menuAdd = data=>post('/menuadd',data)
//菜单详情
export const menuInfo = data=>get('/menuinfo',data)
//菜单修改
export const menuEdit = data=>post('/menuedit',data)
//菜单删除
export const menuDelete = data=>post('/menudelete',data)
// ----------------------角色管理------------------------
//角色列表
export const getrolelist = ()=>get('/rolelist')
//角色的添加
export const roleadd = data=>post('/roleadd',data)
//角色获取
export const roleinfo = data=>get('/roleinfo',data)
//角色修改
export const roleedit = data=>post('/roleedit',data)
//角色删除
export const roledelete = data=>post('/roledelete',data)
// ----------------------管理员管理------------------------
//管理员登录
export const userlogin = data=>post('/userlogin',data)
//管理员列表
export const getuserlist = data=>get('/userlist',data)
//管理员的添加
export const useradd = data=>post('/useradd',data)
//管理员获取
export const userinfo = data=>get('/userinfo',data)
//管理员修改
export const useredit = data=>post('/useredit',data)
//管理员删除
export const userdelete = data=>post('/userdelete',data)
//管理员总数
export const usercount = data=>get('/usercount',data)
// ---------------------商品分类管理------------------------
//商品分类的添加
export const cateadd = (data)=>post('/cateadd',data,true)
//商品分类列表
export const getcatelist = (data)=>get('/catelist',{istree: 1},data)
//商品获取
export const cateinfo = data=>get('/cateinfo',data)
//商品分类修改
export const cateedit = data=>post('/cateedit',data,true)
//商品分类删除
export const catedelete = data=>post('/catedelete',data)
// ---------------------商品规格管理------------------------
//商品规格的添加
export const specsadd = (data)=>post('/specsadd',data)
//商品规格总数
export const specscount = ()=>get('/specscount')
//商品规格列表
export const getspecslist = data=>get('/specslist',data)
//商品规格获取一条
export const specsinfo = data=>get('/specsinfo',data)
//商品规格修改
export const specsedit = data=>post('/specsedit',data)
//商品规格删除
export const specsdelete = data=>post('/specsdelete',data)
// ---------------------商品管理------------------------
//商品的添加
export const goodsadd = (data)=>post('/goodsadd',data,true)
//商品总数
export const goodscount = ()=>get('/goodscount')
//商品列表
export const goodslist = data=>get('/goodslist',data)
//商品获取一条
export const goodsinfo = data=>get('/goodsinfo',data)
//商品修改
export const goodsedit = data=>post('/goodsedit',data,true)
//商品删除
export const goodsdelete = data=>post('/goodsdelete',data)
// ---------------------会员管理------------------------
//会员总数
export const membercount = ()=>get('/membercount')
//会员列表
export const memberlist = data=>get('/memberlist',data)
//会员获取一条
export const memberinfo = data=>get('/memberinfo',data)
//会员修改
export const memberedit = data=>post('/memberedit',data,true)
// ---------------------轮播图管理------------------------
//轮播图的添加
export const banneradd = (data)=>post('/banneradd',data,true)
//轮播图总数
export const bannercount = ()=>get('/bannercount')
//轮播图列表
export const bannerlist = data=>get('/bannerlist',data)
//轮播图获取一条
export const bannerinfo = data=>get('/bannerinfo',data)
//轮播图修改
export const banneredit = data=>post('/banneredit',data,true)
//轮播图删除
export const bannerdelete = data=>post('/bannerdelete',data)
// ---------------------限时秒杀管理------------------------
//限时秒杀的添加
export const seckadd = (data)=>post('/seckadd',data,true)
//限时秒杀根据二级分类id获取商品
export const getgoodslistbysid = (data)=>get('/getgoodslistbysid',data)
//限时秒杀列表
export const secklist = data=>get('/secklist',data)
//限时秒杀获取一条
export const seckinfo = data=>get('/seckinfo',data)
//限时秒杀修改
export const seckedit = data=>post('/seckedit',data,true)
//限时秒杀删除
export const seckdelete = data=>post('/seckdelete',data)